

package com.lh.api.form;

import com.lh.common.enums.OrderTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @Date 2020/5/18 0013 14:40s
 * @Author GaoZien
 * @Desc 创建订单表单
 */
@Data
@ApiModel(value = "创建订单表单")
public class OrderForm {

    @ApiModelProperty(value = "用户地址id",required = true)
    @NotNull(message = "用户地址id是必填项")
    private Long uaid;

    @ApiModelProperty(value = "一元夺宝排期id（一元夺宝订单填写）")
    private Long pid;

    @ApiModelProperty(value = "一元夺宝活动id（一元夺宝订单填写）")
    private Long aid;

    @ApiModelProperty(value = "一元活动购买次数")
    private Integer num;

    @ApiModelProperty(value = "订单类型  ONEDOLLARRUSH:一元抢购  ORDINARYSHOP:普通商品", required = true)
    @NotNull(message = "订单类型为必填项")
    private OrderTypeEnum orderType;

    @ApiModelProperty(value = "商品id及个数，示例：1_2,2_2(商品id为1的买两个，商品id为2的买两个)，一元夺宝订单时不用传")
    private String shopNums;

    @ApiModelProperty(value = "商品总额", required = true)
    @NotNull(message = "商品总额为必填项")
    private BigDecimal shouldPrice;

    @ApiModelProperty(value = "运费，如果免费填0", required = true)
    @NotNull(message = "运费为必填项")
    private BigDecimal freight;

    @ApiModelProperty(value = "实付款", required = true)
    @NotNull(message = "实付款为必填项")
    private BigDecimal payPrice;
}
